package xyz.eden.boot.common.web.support.domain.ability.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.util.Collections;
import java.util.List;

@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public class PageInfo<T> {

    /**
     * 页码
     */
    private Integer pageNumber;
    /**
     * 每页条数
     */
    private Integer pageSize;
    /**
     * 总数
     */
    private Long total;
    /**
     * 数据列表
     */
    private List<T> list;

    public PageInfo<T> builderDefaultPage() {
        return new PageInfo<T>(1, 10, 0L, Collections.emptyList());
    }
}
